<?php
mysql_connect(localhost, root, '');
mysql_select_db(softicuscms);
$resultas=mysql_query("select * from  module_config where  status=1");
while ($row = mysql_fetch_assoc($resultas)) {
    
if($row['module_status']=='sveciai'){
$sveciai='checked';    
}
if($row['module_status']=='naujienos'){
$naujienos='checked';    
}
if($row['module_status']=='fotos'){
$fotos='checked';    
}
if($row['module_status']=='forum'){
$forum='checked';    
}
if($row['module_status']=='baner'){
$baner='checked';    
}
if($row['module_status']=='failer'){
$failer='checked';    
}
}
?>
<html>
<head></head>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<script language="javascript">
var a;

function siuntimas(){


if(document.nustatymai.naujienos.checked==true){
opener.document.moduliai.tekstas.value+='1_naujienos_';
}
if(document.nustatymai.naujienos.checked==false){
opener.document.moduliai.tekstas.value+='0_naujienos_';
}

if(document.nustatymai.failer.checked==true){
opener.document.moduliai.tekstas.value+='1_failer_';
}
if(document.nustatymai.failer.checked==false){
opener.document.moduliai.tekstas.value+='0_failer_';
}


if(document.nustatymai.baneriai.checked==true){
opener.document.moduliai.tekstas.value+='1_baner_';
}
if(document.nustatymai.baneriai.checked==false){
opener.document.moduliai.tekstas.value+='0_baner_';
}


if(document.nustatymai.sveciai.checked==true){
opener.document.moduliai.tekstas.value+='1_sveciai_';
}
if(document.nustatymai.sveciai.checked==false){
opener.document.moduliai.tekstas.value+='0_sveciai_';
}


if(document.nustatymai.fotos.checked==true){
opener.document.moduliai.tekstas.value+='1_fotos_';
}
if(document.nustatymai.fotos.checked==false){
opener.document.moduliai.tekstas.value+='0_fotos_';
}



if(document.nustatymai.forumas.checked==true){
opener.document.moduliai.tekstas.value+='1_forum_';
}
if(document.nustatymai.forumas.checked==false){
opener.document.moduliai.tekstas.value+='0_forum_';
}



opener.document.moduliai.submit();
self.close();
}
</script>
<body style="background-color:#ede7db;">
<div id='div' style='width:300px;height:250px;margin:0;padding:0;left:0;top:0'>

<form name='nustatymai' method='get' action='nustatymai.php'>
<table align='center' cellpadding='0'  cellspacing='0' style='width:300px;'>
	
		<tr>
			<td style='width: 73px'>Moduliai:</td>
			<td>
			
			<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>fotogalerija</td>
					<td><input type='checkbox' name='fotos' <?php echo $fotos;?>></td>
				</tr>
			</table>
			
			</td>
		</tr>
		<tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>
				<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>svečių knyga</td>
					<td><input type='checkbox' name='sveciai' <?php echo $sveciai;?>></td>
				</tr>
			</table>
</td>
		</tr>
        <tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>
				<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>naujienos</td>
					<td><input type='checkbox' name='naujienos' <?php echo $naujienos;?>></td>
				</tr>
			</table>
</td>
		</tr>
        
        <tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>
				<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>forumas</td>
					<td><input type='checkbox' name='forumas' <?php echo $forum;?> DISABLED></td>
				</tr>
			</table>
</td>
		</tr>
          <tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>
				<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>baneriai</td>
					<td><input type='checkbox' name='baneriai' <?php echo $baner;?>></td>
				</tr>
			</table>
</td>

		</tr>
          <tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>
				<table cellpadding='0' cellspacing='0' style='width: 200px'>
				<tr>
					<td width='100px'>failų talpykla</td>
					<td><input type='checkbox' name='failer' <?php echo $failer;?>></td>
				</tr>
			</table>
</td>
		</tr>
		<tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td style='height: 4px; width: 73px;'></td>
			<td style='height: 4px'></td>
		</tr>
		<tr>
			<td style='width: 73px'>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
	</table>
	<div style='margin-left:100px;margin-top:00px;'><a href="javascript:siuntimas();"  >Atnaujinti</a></div>
    
    </form>
</div></body></html>